<template>
    <div>
        <div v-for="(item,index) in printList" :key="index" class="internalControl-print-div">
            <h1 class="table-title">自治区食品药品审评查验中心<br/>项目合同审核单</h1>
            <table border="1" cellspacing="0" class="table-Lu">
                <tr>
                    <th>合同名称</th>
                    <td colspan="4">{{ item.fhtmc }}</td>
                </tr>
                <tr>
                    <th>合同编号</th>
                    <td colspan="2">{{ item.fhtbh?item.fhtbh:'-' }}</td>
                    <th>合同金额</th>
                    <td>{{ item.fhtje }} 元</td>
                </tr>
                <tr>
                    <th>所属项目编号</th>
                    <td colspan="2">{{ item.fssxmbh?item.fssxmbh:'-' }}</td>
                    <th>节约金额</th>
                    <td>{{ item.fjyje }} 元</td>
                </tr>
                <tr>
                    <th>采购代理机构</th>
                    <td colspan="2">{{ item.fcgdljg?item.fcgdljg:'-' }}</td>
                    <th>采购方式</th>
                    <td>{{ item.fcgfs }}</td>
                </tr>
                <tr>
                    <th>是否属于政府采购</th>
                    <td colspan="2">{{ item.fsfzfcg }}</td>
                    <th>采购品目</th>
                    <td>{{ item.fcgpm }}</td>
                </tr>
                <tr>
                    <th>中标供应商名称</th>
                    <td colspan="4">{{ item.fzbgysmc }}</td>
                </tr>
                <tr>
                    <th rowspan="2">采购需求<br/>科室意见</th>
                    <th style="padding: 5px 0px;">经办人</th>
                    <td colspan="3">
                        <div class="contractPay-table-td-yj">
                            <span>{{ item.fjbrshyj }}</span>
                            <span>
                                <img v-if="getUrl('科室经办人审核')" :src="getUrl('科室经办人审核')" class="yjqmImg"/>
                                <span v-else class="yjqmImg">{{ item.fjbrshr }}</span>
                                <span>{{ item.fjbrshyjsj }}</span>
                            </span>
                        </div>
                    </td>
                </tr>
                <tr>
                    <th style="padding: 5px 0px;">负责人</th>
                    <td colspan="3">
                        <div class="contractPay-table-td-yj">
                            <span>{{ item.fksfzrshryj }}</span>
                            <span>
                                <img v-if="getUrl('科室负责人审核')" :src="getUrl('科室负责人审核')" class="yjqmImg"/>
                                <span v-else class="yjqmImg">{{ item.fksfzrshr }}</span>
                                <span>{{ item.fksfzrshryjsj }}</span>
                            </span>
                        </div>
                    </td>
                </tr>
                <tr v-if="item.fcgpm == '课题'">
                    <th rowspan="2">质管科意见</th>
                    <th style="padding: 5px 0px;">经办人</th>
                    <td colspan="3">
                        <div class="contractPay-table-td-yj">
                            <span>{{ item.fzgkjbryj }}</span>
                            <span>
                                <img v-if="getUrl('质管科经办人审核')" :src="getUrl('质管科经办人审核')" class="yjqmImg"/>
                                <span v-else class="yjqmImg">{{ item.fzgkjbr }}</span>
                                <span>{{ item.fzgkjbryjsj }}</span>
                            </span>
                        </div>
                    </td>
                </tr>
                <tr v-if="item.fcgpm == '课题'">
                    <th style="padding: 5px 0px;">负责人</th>
                    <td colspan="3">
                        <div class="contractPay-table-td-yj">
                            <span>{{ item.fzgkfzryj }}</span>
                            <span>
                                <img v-if="getUrl('质管科负责人审核')" :src="getUrl('质管科负责人审核')" class="yjqmImg"/>
                                <span v-else class="yjqmImg">{{ item.fzgkfzr }}</span>
                                <span>{{ item.fzgkfzryjsj }}</span>
                            </span>
                        </div>
                    </td>
                </tr>
                <tr>
                    <th rowspan="3">办公室意见</th>
                    <th style="padding: 5px 0px;">法务人员</th>
                    <td colspan="3">
                        <div class="contractPay-table-td-yj">
                            <span>{{ item.fbgsfwshryj }}</span>
                            <span>
                                <img v-if="getUrl('办公室法务审核')" :src="getUrl('办公室法务审核')" class="yjqmImg"/>
                                <span v-else class="yjqmImg">{{ item.fbgsfwshr }}</span>
                                <span>{{ item.fbgsfwshryjsj }}</span>
                            </span>
                        </div>
                    </td>
                </tr>
                <tr>
                    <th style="padding: 5px 0px;">财务人员</th>
                    <td colspan="3">
                        <div class="contractPay-table-td-yj">
                            <span>{{ item.fbgscwshryj }}</span>
                            <span>
                                <img v-if="getUrl('办公室财务审核')" :src="getUrl('办公室财务审核')" class="yjqmImg"/>
                                <span v-else class="yjqmImg">{{ item.fbgscwshr }}</span>
                                <span>{{ item.fbgscwshryjsj }}</span>
                            </span>
                        </div>
                    </td>
                </tr>
                <tr>
                    <th style="padding: 5px 0px;">负责人</th>
                    <td colspan="3">
                        <div class="contractPay-table-td-yj">
                            <span>{{ item.fbgsfzrshryj }}</span>
                            <span>
                                <img v-if="getUrl('办公室负责人审核')" :src="getUrl('办公室负责人审核')" class="yjqmImg"/>
                                <span v-else class="yjqmImg">{{ item.fbgsfzrshr }}</span>
                                <span>{{ item.fbgsfzrshryjsj }}</span>
                            </span>
                        </div>
                    </td>
                </tr>
                <tr>
                    <th>采购需求科室<br/>分管领导意见</th>
                    <td colspan="4">
                        <div style="padding: 10px 0px;">
                            <span style="display: block;text-align: left;padding-left: 10px;">{{ item.ffgldshryj }}</span>
                            <div class="yjqm-right-bottom">
                                <img v-if="getUrl('分管领导审核')" :src="getUrl('分管领导审核')" class="yjqmImg"/>
                                <span v-else class="yjqmImg">{{ item.ffgldshr }}</span>
                                <span>{{ item.ffgldshryjsj }}</span>
                            </div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <th>主任意见</th>
                    <td colspan="4">
                        <div style="padding: 10px 0px;">
                            <span style="display: block;text-align: left;padding-left: 10px;">{{ item.fzxldspyj }}</span>
                            <div class="yjqm-right-bottom">
                                <img v-if="getUrl('中心主任审批')" :src="getUrl('中心主任审批')" class="yjqmImg"/>
                                <span v-else class="yjqmImg">{{ item.fzxldspr }}</span>
                                <span>{{ item.fzxldspyjsj }}</span>
                            </div>
                        </div>
                    </td>
                </tr>
            </table>
            <div style="page-break-after:always"></div>
        </div>
    </div>
</template>
<script>
import moment from 'moment'
export default {
    components:{

    },
    props:{
        printList:{
            type:[Array,Object],
            default: () => {},
            required:false
        },
        qmImgList:{
            type:[Array,Object],
            default: () => {},
            required:false
        }
    },
    data(){
        return{
            moment:moment,
            // printList: [],
            // qmImgList: [],
        }
    },
    watch:{

    },
    mounted(){

    },
    methods:{
        // 签名图片
        getUrl(hjmcName){
            let url = ''
            // //console.log('签名图片',this.qmImgList)
            if(this.qmImgList.length){
                this.qmImgList.forEach(item => {
                    if(item.hjmc == hjmcName){
                        url = item.url
                    }
                })
            }
            return url
        },
    }
}
</script>
